package by.apiskun.curex.datamodel;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import by.apiskun.curex.datamodel.enums.UserRole;

@Entity
public class User extends AbstractEntity {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long UserId;

	@Column
	@NotNull
	@Size(max = 15)
	private String userFirstName;

	@Column
	@NotNull
	@Size(max = 15)
	private String userMidName;

	@Column
	@NotNull
	@Size(max = 15)
	private String userLastName;

	@Column
	@NotNull
	@Size(max = 20)
	private String login;

	@Column
	@NotNull
	@Size(max = 20)
	private String password;

	@Column
	@NotNull
	@Enumerated(EnumType.ORDINAL)
	private UserRole userRole;

	@Column
	@NotNull
	@Size(max = 25)
	private String userEmail;

	@Column
	@NotNull
	@Size(max = 30)
	private String userPhoneNumber;

	@Column
	@NotNull
	private Boolean userLock;

	public Boolean getUserLock() {
		return userLock;
	}

	public void setUserLock(Boolean userLock) {
		this.userLock = userLock;
	}

	public String getUserFirstName() {
		return userFirstName;
	}

	public void setUserFirstName(String userFirstName) {
		this.userFirstName = userFirstName;
	}

	public String getUserMidName() {
		return userMidName;
	}

	public void setUserMidName(String userMidName) {
		this.userMidName = userMidName;
	}

	public String getUserLastName() {
		return userLastName;
	}

	public void setUserLastName(String userLastName) {
		this.userLastName = userLastName;
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public UserRole getUserRole() {
		return userRole;
	}

	public void setUserRole(UserRole userRole) {
		this.userRole = userRole;
	}

	public String getUserEmail() {
		return userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}

	public String getUserPhoneNumber() {
		return userPhoneNumber;
	}

	public void setUserPhoneNumber(String userPhoneNumber) {
		this.userPhoneNumber = userPhoneNumber;
	}

	public void setUserId(Long userId) {
		UserId = userId;
	}

	@Override
	public Long getId() {
		return UserId;
	}
}
